|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectvectorimage.VectorObject
raar.world.RAWorldObject
raar.world.RAWorldObjectMovable
raar.agent.RAAgent
public class RAAgent
Overall class that brings all the process and agent stuff together. This class allows one to fully construct an agent.
| Field Summary | |
|---|---|
static java.lang.String |
AGENT_CLASS_NAME
Agent class name. |
static int |
SIZE
How large is an agent (in pixels)? |
| Fields inherited from class raar.world.RAWorldObject |
|---|
SOBJ_AGENT, SOBJ_TRACE |
| Fields inherited from class vectorimage.VectorObject |
|---|
OBJ_ELLIPSE, OBJ_LINE, OBJ_RECTANGLE |
| Constructor Summary | |
|---|---|
RAAgent()
Default constructor. |
|
RAAgent(java.util.Vector processes)
Constructor. |
|
RAAgent(java.util.Vector processes,
boolean makeActors)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addProcess(RAProcess p)
Add a process. |
boolean |
canBeEdited()
Return whether this agent can be edited in SB-MASE. |
boolean |
canBeExternal()
Return whether this agent can be an external agent in SB-MASE. |
boolean |
canBeSimulated()
Return whether this agent can be simulated in SB-MASE. |
void |
connect(RAProcess outputProcess,
java.lang.String outputProcessRegister,
RAProcess inputProcess,
java.lang.String inputProcessRegister)
Connect a specified output to a specified input. |
GVectorObject |
createGVectorObject()
Create a graphical presentation. |
void |
disconnect(RAProcess outputProcess,
java.lang.String outputProcessRegister,
RAProcess inputProcess,
java.lang.String inputProcessRegister)
Disconnect a specified input from a specified output. |
void |
dump()
Dump all registers of all processes to screen or file. |
RAActor |
getActor(java.lang.String name)
Return the actor with the given name or null if this actor does not exist. |
java.lang.String[] |
getActorNames()
Return the names of actors. |
java.awt.Color |
getColor()
Return the color of this agent. |
java.util.Vector |
getConnections()
Return all the connections. |
java.lang.String |
getName()
Return the agent's name. |
java.util.Vector |
getNormalProcesses()
Allows one to get only the normal processes. |
java.util.Vector |
getOtherProcesses()
Get the non-normal processes... |
RAProcess |
getProcess(java.lang.String na)
Return the process with given name. |
java.util.Vector |
getProcesses()
Return the compiled processes. |
RAWorld |
getWorld()
Return the world the agent is in. |
boolean |
isConnected()
Return whether this agent is connected to some external source, which implies that it should not be simulated at the moment. |
boolean |
isEditable()
Return whether agent is currently editable. |
void |
notifyAddedToWorld(RAWorld r)
Notify this agent that it has been added to the specified world -- from now on it can request this world to move it. |
void |
notifyAddedToWorld(RAWorld r,
java.awt.geom.Point2D.Double originalPosition,
double originalRotation)
Notify this agent that it has been added to the specified world -- from now on it can request this world to move it. |
void |
removeProcess(RAProcess p)
Remove a process. |
void |
replaceProcess(RAProcess p,
RAProcess newP)
Replace process p by newP. |
void |
reset()
Reset the agent. |
void |
runAgent()
Runs the agent once. |
void |
setName(java.lang.String s)
Set the agent's name. |
java.lang.String |
toString()
String representation. |
| Methods inherited from class raar.world.RAWorldObjectMovable |
|---|
resetPR, setPR |
| Methods inherited from class raar.world.RAWorldObject |
|---|
emitsLight, getClassName, isFixed, isLight, isMassive, isMovable, isStatic, moveBy |
| Methods inherited from class vectorimage.VectorObject |
|---|
contains, getBounds, getPosition, getRotation, getType, isFilled, setBounds, setPosition, setRotation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String AGENT_CLASS_NAME
public static final int SIZE
| Constructor Detail |
|---|
public RAAgent()
public RAAgent(java.util.Vector processes)
public RAAgent(java.util.Vector processes,
boolean makeActors)
| Method Detail |
|---|
public void setName(java.lang.String s)
public java.lang.String getName()
getName in class RAWorldObjectpublic boolean isEditable()
public java.lang.String[] getActorNames()
public RAActor getActor(java.lang.String name)
public java.awt.Color getColor()
getColor in class VectorObject
public void addProcess(RAProcess p)
throws RAException
RAException
public void removeProcess(RAProcess p)
throws RAException
RAException
public void replaceProcess(RAProcess p,
RAProcess newP)
throws RAException
RAException
public void connect(RAProcess outputProcess,
java.lang.String outputProcessRegister,
RAProcess inputProcess,
java.lang.String inputProcessRegister)
throws RAException
The - output processThe - name of the output registerThe - input processThe - name of the input register
RAException
public void disconnect(RAProcess outputProcess,
java.lang.String outputProcessRegister,
RAProcess inputProcess,
java.lang.String inputProcessRegister)
The - outputprocessThe - name of the output registerThe - inputprocessThe - name of the input registerpublic java.util.Vector getConnections()
public void notifyAddedToWorld(RAWorld r)
public void notifyAddedToWorld(RAWorld r,
java.awt.geom.Point2D.Double originalPosition,
double originalRotation)
public RAWorld getWorld()
public void reset()
throws RAException
RAException
public void runAgent()
throws RAException
RAExceptionpublic java.util.Vector getProcesses()
public RAProcess getProcess(java.lang.String na)
public void dump()
public java.util.Vector getNormalProcesses()
public java.util.Vector getOtherProcesses()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean canBeEdited()
public boolean canBeSimulated()
public boolean canBeExternal()
public boolean isConnected()
public GVectorObject createGVectorObject()
createGVectorObject in class RAWorldObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||